import React, { Component } from 'react'
import { BrowserRouter, Route, Switch, Redirect } from 'react-router-dom'
import Login from '../pages/login'
import Main from '../pages/main'
import NoAuth from '../pages/noAuth'
import 'antd/dist/antd.css'

class Routers extends Component {
    render() {
        return (
            <BrowserRouter>
                <Switch>
                    <Route path="/login" component={Login}></Route>
                    <Route path="/main" component={Main}></Route>
                    <Route path="/noAuth" component={NoAuth}></Route>
                    <Redirect from="/" to="/login"></Redirect>
                </Switch>
            </BrowserRouter>
        )
    }
}

export default Routers